//
//  OrderDetailStatusView.swift
//  Xiaozihui
//
//  Created by 校企荟 on 2017/10/12.
//  Copyright © 2017年 校企荟. All rights reserved.
//

import UIKit

class OrderDetailStatusView: UIView {

    
    
    override init(frame: CGRect) {
        super.init(frame: CGRect(x: 0, y: 0, width: ScreenWidth, height: 200 * ScaleX))
        setupUI()
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    func setupUI() {
        
    }
    
    func creatView(title:String, time:String) -> (UIView) {
        let view = UIView(frame: CGRect(x: 0, y: 0, width: ScreenWidth, height: 50 * ScaleX))
        let nameLbl = UILabel(content: title, textFont: UIFont.systemFont(ofSize: 14 * ScaleX), color: mainColor, alignment: .left, numberOfLine: 1)
        let timeLbl = UILabel(content: time, textFont: UIFont.systemFont(ofSize: 10 * ScaleX), color: mainColor, alignment: .left, numberOfLine: 1)
        view.addSubview(nameLbl)
        view.addSubview(timeLbl)
        nameLbl.snp.makeConstraints { (make) in
            make.left.equalTo(view).offset(92 * ScaleX)
            make.top.equalTo(view).offset(10)
        }
        
        timeLbl.snp.makeConstraints { (make) in
            make.left.equalTo(view).offset(92 * ScaleX)
            make.top.equalTo(nameLbl).offset(10) 
        }
        return view
    }
}
